
#include "RBTree.h"
#include "MyMap.h"
#include "MySet.h"

int main()
{
	//srand(time(nullptr));

	//RBTree<int, int> t;

	//int arr[] = { 16, 3, 7, 11, 9, 26, 18, 14, 15 };

	//for (auto e : arr)
	//{
	//	if (e == 7)
	//	{
	//		int a = 0;
	//	}

	//	t.Insert({ e, e });
	//}

	//int N = 10000;
	//for (int i = 0; i < N; i++)
	//{
	//	int ret = rand() + i;
	//	t.Insert({ ret, ret });
	//}

	//t.inOrder();

	//cout << endl << endl;
	//cout << t.isBanlance() << endl;
	

	//chen::map<int, int> m;
	//int arr[] = { 16, 3, 7, 11, 9, 26, 18, 14, 15 };

	//for (auto e : arr)
	//{
	//	if (e == 7)
	//	{
	//		int a = 0;
	//	}

	//	m.insert({ e, e });
	//}

	//int N = 10000;
	//for (int i = 0; i < N; i++)
	//{
	//	int ret = rand() + i;
	//	m.insert({ ret, ret });
	//}

	//m.inorder();

	//cout << endl << endl;
	////cout << t.isBanlance() << endl;


	//chen::map<string, string> m1;
	//m1.insert({ "333", "111" });
	//m1.insert({ "222", "222" });
	//m1.insert({ "111", "111" });
	//m1.insert({ "444", "111" });
	//m1.insert({ "666", "111" });
	//m1.insert({ "555", "111" });
	//m1.insert({ "999", "111" });
	//m1.inorder();



	chen::set<int> s;
	int arr[] = { 16, 3, 7, 11, 9, 26, 18, 14, 15 };

	for (auto e : arr)
	{
		if (e == 7)
		{
			int a = 0;
		}

		s.insert(e);
	}

	/*int N = 10000;
	for (int i = 0; i < N; i++)
	{
		int ret = rand() + i;
		s.insert(ret);
	}*/

	//s.inorder();
	chen::set<int>::iterator it = s.begin();
	while (it != s.end())
	{
		cout << *it << endl;
		++it;
	}


	cout << endl << endl;
	//cout << s.isBanlance() << endl;


	chen::set<string> m1;
	m1.insert( "333" );
	m1.insert("222" );
	m1.insert( "111" );
	m1.insert("444" );
	m1.insert ("666" );
	m1.insert( "555");
	m1.insert( "999" );

	//m1.inorder();
	return 0;
}


